import React, { Component } from 'react'
import PropTypes from "prop-types"

/**
 * 要求使用Children组件，必须传递count，数据类型number
 */
class Children extends Component {
  render() {
    const {count,subs} = this.props
    return (
      <div>
        <h2>Children</h2>
        <p>{count}</p>
        <p>{subs}</p>
      </div>
    )
  }
}
// Children.propTypes = {
//     count:PropTypes.number.isRequired,
//     subs:PropTypes.array
// }
Children.defaultProps = {
    count:"100"
}
export default Children